from flask import Flask
from do_mysql import settings
from do_mysql.ext import db
from do_mysql.app.users.user_view import user_bp


def create_app():
    app = Flask(__name__, template_folder='../templates', static_folder='../static')
    app.config.from_object(settings.developEnv)
    app.register_blueprint(user_bp)
    db.init_app(app)
    return app
